package com.guigu.xiaowenbo.service.impl;

import com.guigu.xiaowenbo.mapper.SgatherMapper;
import com.guigu.xiaowenbo.mapper.SgatherdetailsMapper;
import com.guigu.xiaowenbo.pojo.Sgather;
import com.guigu.xiaowenbo.pojo.Sgatherdetails;
import com.guigu.xiaowenbo.service.SgatherdetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SgatherdetailsServiceImpl implements SgatherdetailsService {
    @Autowired(required = false)
    SgatherdetailsMapper sgatherdetailsMapper;
    @Autowired(required = false)
    SgatherMapper sgatherMapper;
    public int insertsgd(Sgatherdetails sgatherdetails){
        return sgatherdetailsMapper.insertsgd(sgatherdetails);
    }

    public List<Sgatherdetails> selectsgd(Integer parentid){
        return sgatherdetailsMapper.selectsgd(parentid);
    }
    public Sgather selectsgid(Integer id){
        return sgatherMapper.selectsgid(id);
    }
    public List<Sgatherdetails> selectsgddd(Integer parentid){
        return sgatherdetailsMapper.selectsgddd(parentid);
    }
    public Sgatherdetails selectsgdp(Integer parentid,String productid){
        return sgatherdetailsMapper.selectsgdp(parentid,productid);
    }
    public int updatesgd(Integer parentid,String productid){
        return sgatherdetailsMapper.updatesgd(parentid,productid);
    }
    public List<Sgatherdetails> selectsgdrs(Integer parentid){
        return sgatherdetailsMapper.selectsgdrs(parentid);
    }
    public int updatesgdrs(Integer parentid,String productid,Integer gatheredamount){
        return sgatherdetailsMapper.updatesgdrs(parentid,productid,gatheredamount);
    }
    public int updatesgdrses(Integer parentid,String productid,Integer gatheredamounts){
        return sgatherdetailsMapper.updatesgdrses(parentid,productid,gatheredamounts);
    }

    @Override
    public int insert_WZY(Sgatherdetails sgatherdetails) {
        return sgatherdetailsMapper.insert_WZY(sgatherdetails);
    }

}
